/* 主容器样式 */
.main-container {
    -fx-background-color: #f9f9f9;
}

/* 侧边栏样式 */
.sidebar {
    -fx-background-color: #f0f0ff;
    -fx-min-width: 250px;
    -fx-pref-width: 280px;
    -fx-max-width: 320px;
    -fx-padding: 15;
    -fx-spacing: 15;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 8, 0, 2, 0);
}

/* 新建对话按钮 */
.new-chat-button-container {
    -fx-padding: 10 0 15 0;
    -fx-border-color: transparent transparent #e0e0f0 transparent;
    -fx-border-width: 0 0 1 0;
}

.new-chat-button {
    -fx-background-color: #5e5df6;
    -fx-text-fill: white;
    -fx-font-size: 14px;
    -fx-font-weight: bold;
    -fx-padding: 10 15;
    -fx-background-radius: 20;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-pref-width: 180px;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.3), 4, 0, 0, 2);
}

.new-chat-button:hover {
    -fx-background-color: #4e4df0;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.4), 6, 0, 0, 3);
}

.new-chat-button:pressed {
    -fx-background-color: #3e3de0;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.2), 2, 0, 0, 1);
}

.search-button {
    -fx-background-color: #f0f0ff;
    -fx-text-fill: #5e5df6;
    -fx-font-size: 14px;
    -fx-background-radius: 15;
    -fx-cursor: hand;
    cursor: pointer;
}

.search-button:hover {
    -fx-background-color: #e0e0f5;
}

/* 历史记录样式 */
.history-header {
    -fx-font-size: 14px;
    -fx-font-weight: bold;
    -fx-text-fill: #666;
    -fx-padding: 10 0 8 5;
}

.history-container {
    -fx-padding: 5;
    -fx-spacing: 5;
}

.history-item {
    -fx-background-color: transparent;
    -fx-padding: 10;
    -fx-background-radius: 6;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-border-width: 0;
}

.history-item-title {
    -fx-text-fill: #333333;
    -fx-font-size: 14px;
}

.history-item:hover {
    -fx-background-color: #e8e8fa;
}

.history-item-selected {
    -fx-background-color: #dedeff;
    -fx-border-color: #c5c5f5;
    -fx-border-width: 0 0 0 4;
    -fx-border-radius: 0;
}

.history-item-selected .history-item-title {
    -fx-font-weight: bold;
    -fx-text-fill: #4e4df0;
}

.history-scroll {
    -fx-background: transparent;
    -fx-background-color: transparent;
}

.history-scroll .viewport {
    -fx-background-color: transparent;
}

.history-scroll .scroll-bar:vertical {
    -fx-background-color: transparent;
    -fx-pref-width: 10;
    -fx-opacity: 0.8;
}

.history-scroll .scroll-bar:vertical .thumb {
    -fx-background-color: #c0c0c0;
    -fx-background-radius: 5;
}

.sidebar-footer {
    -fx-padding: 15 0 0 0;
    -fx-border-color: #e0e0f0 transparent transparent transparent;
    -fx-border-width: 1 0 0 0;
}

.manage-button {
    -fx-background-color: transparent;
    -fx-text-fill: #666;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-padding: 8 12;
    -fx-background-radius: 4;
}

.manage-button:hover {
    -fx-text-fill: #5e5df6;
    -fx-background-color: #f0f0ff;
}

/* 主聊天面板 */
.chat-main-panel {
    -fx-background-color: white;
    -fx-border-color: #e0e0e0;
    -fx-border-width: 0 0 0 1;
}

/* AI信息头部 */
.ai-info-header {
    -fx-padding: 15;
    -fx-spacing: 15;
    -fx-border-color: transparent transparent #e0e0e0 transparent;
    -fx-border-width: 0 0 1 0;
    -fx-alignment: center-left;
    -fx-background-color: #fafafa;
}

.ai-avatar {
    -fx-background-radius: 20;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.2), 5, 0, 0, 1);
}

.ai-name {
    -fx-font-size: 18px;
    -fx-font-weight: bold;
}

.ai-description {
    -fx-font-size: 14px;
    -fx-text-fill: #666;
}

.ai-avatar-text {
    -fx-background-color: #5e5df6;
    -fx-background-radius: 25;
    -fx-min-width: 50;
    -fx-min-height: 50;
    -fx-alignment: center;
    -fx-text-fill: white;
    -fx-font-weight: bold;
    -fx-font-size: 18px;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.2), 5, 0, 0, 1);
}

.switch-button {
    -fx-background-color: #f0f0ff;
    -fx-text-fill: #5e5df6;
    -fx-font-size: 14px;
    -fx-padding: 8 15;
    -fx-background-radius: 15;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-border-color: #d0d0f0;
    -fx-border-radius: 15;
    -fx-border-width: 1;
}

.switch-button:hover {
    -fx-background-color: #e0e0ff;
}

/* 聊天内容区域 */
.chat-container {
    -fx-background-color: white;
    -fx-padding: 15;
}

.custom-scroll-pane {
    -fx-background: transparent;
    -fx-background-color: white;
}

.custom-scroll-pane .viewport {
    -fx-background-color: white;
}

.custom-scroll-pane .scroll-bar:vertical {
    -fx-background-color: transparent;
    -fx-pref-width: 12;
    -fx-opacity: 0.8;
}

.custom-scroll-pane .scroll-bar:vertical .thumb {
    -fx-background-color: #c0c0c0;
    -fx-background-radius: 6;
}

.custom-scroll-pane .scroll-bar:vertical .track {
    -fx-background-color: transparent;
}

.custom-scroll-pane .scroll-bar:vertical .increment-button,
.custom-scroll-pane .scroll-bar:vertical .decrement-button {
    -fx-background-color: transparent;
    -fx-padding: 0;
}

/* 用户和AI消息样式 */
.message-container {
    -fx-max-width: 800px;
    -fx-padding: 5 0;
}

.user-message {
    -fx-background-color: #e3f1ff;
    -fx-background-radius: 16px 16px 4px 16px;
    -fx-padding: 12 16;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 3, 0, 0, 1);
}

.ai-message {
    -fx-background-color: #f8f9fa;
    -fx-background-radius: 16px 16px 16px 4px;
    -fx-border-color: #eaeaea;
    -fx-border-width: 1;
    -fx-border-radius: 16px 16px 16px 4px;
    -fx-padding: 14 18;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.05), 4, 0, 0, 1);
}

.message-label {
    -fx-font-size: 15px;
    -fx-font-family: 'System';
    -fx-text-fill: #333333;
    -fx-wrap-text: true;
    -fx-line-spacing: 6;
    -fx-letter-spacing: 0.2px;
}

/* 功能卡片区域 */
.feature-container {
    -fx-padding: 15;
    -fx-background-color: white;
    -fx-border-color: #e0e0e0 transparent transparent transparent;
    -fx-border-width: 1 0 0 0;
}

.feature-cards {
    -fx-padding: 0 0 15 0;
    -fx-alignment: center;
    -fx-spacing: 20;
}

.feature-card {
    -fx-background-color: #f5f7fd;
    -fx-background-radius: 10;
    -fx-padding: 15;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.05), 3, 0, 0, 1);
    -fx-border-color: #e5e7ed;
    -fx-border-width: 1;
    -fx-border-radius: 10;
}

.feature-card:hover {
    -fx-background-color: #eef1fc;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 5, 0, 0, 2);
    -fx-scale-x: 1.02;
    -fx-scale-y: 1.02;
}

.feature-title {
    -fx-font-size: 16px;
    -fx-font-weight: bold;
    -fx-text-fill: #333;
    -fx-padding: 0 0 5 0;
}

.feature-description {
    -fx-font-size: 13px;
    -fx-text-fill: #666;
    -fx-wrap-text: true;
}

/* 输入区域 */
.input-panel {
    -fx-padding: 10 10 10 10;
    -fx-background-color: #f9f9f9;
    -fx-background-radius: 10;
    -fx-border-color: #e0e0e0;
    -fx-border-radius: 10;
    -fx-border-width: 1;
}

.message-input {
    -fx-background-color: white;
    -fx-background-radius: 8;
    -fx-border-color: #e0e0e0;
    -fx-border-radius: 8;
    -fx-border-width: 1;
    -fx-padding: 12 15;
    -fx-font-size: 14px;
    -fx-pref-height: 42px;
}

.message-input:focused {
    -fx-border-color: #5e5df6;
    -fx-background-color: white;
}

.send-button {
    -fx-background-color: #5e5df6;
    -fx-text-fill: white;
    -fx-font-size: 14px;
    -fx-font-weight: bold;
    -fx-background-radius: 8;
    -fx-min-width: 80px;
    -fx-min-height: 42px;
    -fx-cursor: hand;
    cursor: pointer;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.3), 3, 0, 0, 1);
}

.send-button:hover {
    -fx-background-color: #4e4df0;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.4), 5, 0, 0, 2);
}

.send-button:pressed {
    -fx-background-color: #3e3de0;
    -fx-effect: dropshadow(gaussian, rgba(94,93,246,0.2), 2, 0, 0, 1);
}

/* 富文本样式 */
.text-flow {
    -fx-line-spacing: 5px;
}

/* 会话按钮样式 */
.session-button {
    -fx-background-color: transparent;
    -fx-border-color: transparent;
    -fx-background-radius: 50%;
    -fx-min-width: 28px;
    -fx-min-height: 28px;
    -fx-max-width: 28px;
    -fx-max-height: 28px;
    -fx-padding: 4;
    -fx-font-size: 11px;
    -fx-alignment: center;
    -fx-cursor: hand;
    cursor: pointer;
}

.session-button:hover {
    -fx-background-color: rgba(0, 0, 0, 0.05);
    -fx-text-fill: #4e4df0;
}

/* 代码块样式 */
.code-block {
    -fx-background-color: #f5f5f5;
    -fx-background-radius: 4px;
    -fx-border-color: #e0e0e0;
    -fx-border-radius: 4px;
    -fx-border-width: 1px;
    -fx-padding: 10 15;
    -fx-font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    -fx-text-fill: #333;
    -fx-font-size: 14px;
    -fx-wrap-text: true;
    -fx-letter-spacing: 0px;
}

/* 引用块样式 */
.quote-block {
    -fx-background-color: #f0f0f0;
    -fx-background-radius: 4px;
    -fx-border-color: #e0e0e0 transparent #e0e0e0 #c0c0c0;
    -fx-border-radius: 0px;
    -fx-border-width: 1px 0px 1px 4px;
    -fx-padding: 10 15;
    -fx-text-fill: #555;
    -fx-font-style: italic;
    -fx-font-size: 14px;
    -fx-wrap-text: true;
}

/* 列表项样式 */
.list-item {
    -fx-text-fill: #333;
    -fx-font-size: 14px;
    -fx-wrap-text: true;
    -fx-padding: 3 0 3 20;
    -fx-graphic-text-gap: 10;
}

/* 标题文本样式 */
.title-text {
    -fx-font-size: 20px;
    -fx-font-weight: bold;
    -fx-text-fill: #333;
    -fx-padding: 5 0 10 0;
}

/* 副标题文本样式 */
.subtitle-text {
    -fx-font-size: 16px;
    -fx-font-weight: bold;
    -fx-text-fill: #333;
    -fx-padding: 5 0 5 0;
}

/* 链接文本样式 */
.link-text {
    -fx-fill: #5e5df6;
    -fx-underline: true;
    -fx-cursor: hand;
    cursor: pointer;
}

.link-text:hover {
    -fx-fill: #4e4df0;
}